package com.draemoncode.weixindb.busiutil;


import com.draemoncode.weixindb.content.GlobalContent;
import com.draemoncode.weixindb.server.CMessagePackage;
import com.draemoncode.weixindb.util.JSONUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CheckUtil {

    private final static Logger log = LoggerFactory.getLogger(CheckUtil.class);

    public static boolean checkCurrSyncId(CMessagePackage b_csmessage){
        if(b_csmessage.getSyncid() != null && b_csmessage.getSyncid().equals(GlobalContent.getCurrSyncId())){
            return true;
        }else{
            log.error("有垃圾消息: " + JSONUtil.toJson(b_csmessage));
            return false;
        }
    }
}
